<template>
  <mescroll
    class="list-draw"
    @mescrollInit="init"
    :upAuto="!hasInit && actived"
  >
    <div style="padding: 0 16px; background: white">
      <DynamicItem
        v-for="(item, index) in dynamicList"
        :info="item"
        :key="index"
      ></DynamicItem>
    </div>
  </mescroll>
</template>

<script>
import Mescroll from 'lottery/components/Mescroll/Mescroll';
import { DynamicItem } from '@/components/DynamicMessage/index';

export default {
  name: 'VueJiangduoduoComLuckyTicket',
  props: {
    type: {
      type: [String, Number],
      required: true,
    },
    actived: {
      type: Boolean,
      default: false,
    },
  },
  components: { Mescroll, DynamicItem },
  data() {
    return {
      hasInit: false,
      dynamicList: [
        {
          ipAddress: '山东',
          shortTime: '03-03 14:51',
          content: '留给我的奖池不多了，求双蓝！',
          likeCount: 30,
          replyCount: 20,
          imgList: [
            {
              originImg: 'http://img.caihongduoduo.com/2023-03-03/b02d2cdf-61f9-4bc9-80bf-ca6ebba2fe421677815979136.jpg?width=1080&height=2400',
              thumbImg: 'https://f.caihongduoduo.com/icon/a9b691ab-b28a-4ef8-be90-6b09390e2c044370626056255284748.jpg?width=540&height=1200',
            },
            {
              originImg: 'http://img.caihongduoduo.com/2023-03-03/f35ba810-eb86-49d2-8f2b-9a3563491f691677815979272.jpg?width=1080&height=2400',
              thumbImg: 'https://f.caihongduoduo.com/icon/42245c3d-e50d-4a8e-85aa-2c13d21daaf32976867370759083058.jpg?width=540&height=1200',
            },
            {
              originImg: 'http://img.caihongduoduo.com/2023-03-03/2866f46b-9fd6-435a-b6b1-076425e059681677815979173.jpg?width=1001&height=1500',
              thumbImg: 'https://f.caihongduoduo.com/icon/3028e681-5148-476a-ba8d-660c90f2d44f2946334885105647351.jpg?width=400&height=600',
            },
            {
              originImg: 'http://img.caihongduoduo.com/2023-03-03/3cfada70-5e56-42f6-8a3a-b283898725041677815979162.jpg?width=1001&height=1500',
              thumbImg: 'https://f.caihongduoduo.com/icon/12d1c72b-c37e-433f-a3f5-670a200515752473548473796377299.jpg?width=400&height=600',
            },
            {
              originImg: 'http://img.caihongduoduo.com/2023-03-03/e007fde4-beb0-4058-8091-374f425e9c131677815979151.jpg?width=1066&height=1600',
              thumbImg: 'https://f.caihongduoduo.com/icon/1aed747e-4df7-418b-b871-744bc09f4a926307918468639877637.jpg?width=399&height=600',
            },
            {
              originImg: 'http://img.caihongduoduo.com/2023-03-03/c05d85e1-479b-4082-b73e-41062296575b1677815979634.jpg?width=1066&height=1600',
              thumbImg: 'https://f.caihongduoduo.com/icon/53b0faea-615c-487a-bef7-91fc867c92f38849700233781533884.jpg?width=399&height=600',
            },
          ],
          isLike: 0,
          userInfo: {
            faceUrl:
              'https://f.caihongduoduo.com/2023/02/09/6D7CF2DF917F03F01766CBF73D67871E.jpg',
            nickName: '五彩小怨种',
          },
        },
        {
          ipAddress: '河南',
          shortTime: '03-03 14:51',
          content: '大乐透23期图谜，\n尤其注意图形出号，其它元素和珠粒形成的组合出号。',
          likeCount: 3,
          replyCount: 24,
          imgList: [
            {
              originImg: 'http://img.caihongduoduo.com/2023-03-03/e6fe2f91-584a-4c10-b426-97316f28c53c1677827985605.jpg?width=1536&height=2048',
              thumbImg: 'https://f.caihongduoduo.com/icon/5d475976-0957-4ae2-9d78-95063dad39394562951978700044050.jpg?width=768&height=1024',
            },
          ],
          isLike: 1,
          userInfo: {
            faceUrl:
              'https://f.caihongduoduo.com/2023/01/16/68651D0A57D6FD77531A19F59E006D10.jpg',
            nickName: '壹等奖哦',
          },
        },
      ],
    };
  },

  mounted() {},

  methods: {
    async init(cb) {
      console.log('🚀 ~ file: national.vue:38 ~ init ~ cb:', cb);
      this.hasInit = true;

      try {
        /* empty */
      } catch (error) {
        /* empty */
      } finally {
        cb(false);
      }
    },
  },
};
</script>

<style lang="scss" scoped></style>
